﻿using QMERP.SeedWork;

namespace QMERP.Domain.Entities
{
    /// <summary>
    /// 入库单
    /// </summary>
    public partial class EnterStockOrder : FullEntity<long>
    {
        public EnterStockOrder() 
        {
            EnterStockOrderDetails = new HashSet<EnterStockOrderDetail>();
        }
        /// <summary>
        /// 入库单号
        /// </summary>
        public string Number { get; set; } = "";
        /// <summary>
        /// 出库单Id
        /// </summary>
        public long? LeaveStockOrderId { get; set; }
        /// <summary>
        /// 业务单Id
        /// </summary>
        public long? BusinessOrderId { get; set; }
        /// <summary>
        /// 业务单编号
        /// </summary>
        public string? BusinessOrderNumber { get; set; }
        /// <summary>
        /// 业务单类型
        /// </summary>
        public string? BusinessOrderType { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        public string BusinessType { get; set; } = "";
        /// <summary>
        /// 入库状态
        /// </summary>
        public string Status { get; set; } = "";
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
        /// <summary>
        /// 审核人Id
        /// </summary>
        public long? CheckedBy { get; set; }
        /// <summary>
        /// 审核人名称
        /// </summary>
        public string? CheckedByName { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? CheckedOn { get; set; }
        
        /// <summary>
        /// 收货单详情列表
        /// </summary>
        public virtual ICollection<EnterStockOrderDetail> EnterStockOrderDetails { get; set; }

        public virtual LeaveStockOrder? LeaveStockOrder { get; set; }
    }
}
